/**
* v-hasPermi 操作权限处理
* Copyright (c) 2019 ruoyi
*/

import useUserStore from '@/store/modules/user';
import Validator from '@/utils/Validator';
export default {
    mounted(el, binding, vnode) {
        const { value } = binding
        if(!Validator.isEmpty(value)){
            useUserStore().hasPermission(value).then(res=>{
                if(res){
                    
                }else{
                    el.parentNode && el.parentNode.removeChild(el)
                }
            })
        }
        else {
            throw new Error(`请设置操作权限标签值`)
        }
        
        
    }
}
